home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
TCL1
/
JOHNLOVE
/
C_SOURCE
/
CMETER.H
< prev
next >
Wrap
Text File
|
1992-02-16
|
2KB
|
75 lines
/********************************************************************
"CMeter.h"
by: Walt Davis [MacTutor, September 1991]
converted to "C" & OOP by: John A. Love, III
using Symantec's "THINK C", v 5.0.1
********************************************************************/
#define _H_CMeter
#include <Global.h>
#include <CApplication.h>
#include <CDocument.h>
#include <CPane.h>
#include <CPaneBorder.h>
struct CMeterMainPane : CPane { /* Pane #1 */
/* Includes string "title" above progress bar + "% Completed" scale below it: */
Str255 mTitle;
void Draw (Rect *area);
};
struct CProgressBar : CMeterMainPane { /* Pane #2 */
/* Draws the graduation marks within the progress bar: */
void Draw (Rect *area);
};
struct CProgressBorder : CPaneBorder {
/* Round frame for the above progress bar: */
void IPaneBorder (short borderFlags);
void DrawBorder (Rect *paneFrame);
};
struct CMakingProgress : CProgressBar { /* Pane #3 */
Boolean start;
short maxSteps, currStep;
void Draw (Rect *area);
short Calculate (void); /* Returns new "currStep" */
};
struct CMeter : CDocument { /* The Supervisor of all three */
LongFunc calc; /* Calculates completion % */
// Two sub-views below the main pane:
CProgressBar *meterProgressBar;
CMakingProgress *progressO;
void IMeter (short WINDid, LongFunc calculateProgress, Str255 bannerStr,
short maxSteps, CApplication *itsSupervisor);
void StartProgress (void);
void UpdateProgress (void);
void EndProgress (void);
void Dispose (void);
};
/* { end file "CMeter.h" } */